package org.millioncall.yueyoga.admin.service;

import java.util.List;
import java.util.Map;

import org.millioncall.openplatform.common.PaginatedList;
import org.millioncall.yueyoga.admin.model.Group;
import org.millioncall.yueyoga.admin.model.Hall;
import org.millioncall.yueyoga.admin.model.LoginUser;
import org.millioncall.yueyoga.admin.model.GroupUserModel;
import org.millioncall.yueyoga.admin.model.User;
import org.millioncall.yueyoga.admin.model.UserHallModel;
import org.millioncall.yueyoga.admin.model.UserHallRole;
import org.millioncall.yueyoga.admin.service.impl.UserServiceImpl.LoginResult;

public interface UserService {

	public List<User> findTaskUser();

	public PaginatedList<User> getUsersInPage(int start, int limit,
			Map<String, Object> map);

	/**
	 * 获取带权限信息的认证用户
	 * 
	 * @param username
	 * @return
	 */
	public User getAuthenticateUserByUsername(String username);

	public User getUserByUsername(String username);

	public User getUserByEmail(String email);

	public int deleteUsersByIds(String[] arrids);

	public boolean updateUser(User dbuser);
	
	public boolean updateUserGroups(User dbuser);	

	public boolean saveUser(User user);

	public String getCnStrGroups(List<Group> groups);

	public LoginResult userLogin(LoginUser lu, String sessionCaptcha);

	public List<User> findAllUsers(Map<String, Object> map);

	public User findById(String Id);

	public boolean updateUser(Map<String, Object> map);

	public PaginatedList<User> findByGroupInPage(Integer start, Integer limit,
			String name);

	public List<User> findByGroup(Integer start, Integer limit, String name);

	public int deleteByGroup(String name);

	public List<User> findAllAssignedTo(String name);

	public List<User> findByProperty(String key, String value);

	public List<GroupUserModel> findUsersByGroupId(String groupId,
			String organizationId);
	
	public int deleteUserById(List<String> Ids);
	
	public boolean updatePassword(Map<String, Object> map);
	
	/***查询当前登录用户的所在用户组的分馆编号 */
	public List<UserHallModel> findUserGroupHall(Map<String, Object> map);
	
	/***当前用户所在会馆的名称*/
	public Hall findUserByHallName(String hallcode);
	
	/*** 判断会员所在组是否指定资源*/
	public List<UserHallRole> findRoleId(String userId);
}
